package com.victualler.product.goods.entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.victualler.core.base.dao.BaseDao;
import com.victualler.core.common.annotation.ListShowColumn;
import com.victualler.core.common.enums.ColumnFormatEnum;

import javax.persistence.*;
import java.io.Serializable;

@Entity
@Table(name="goods_main")
@JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler" })
public class GoodsMainDao extends BaseDao implements Serializable {

    @ListShowColumn(title = "产品类型",sort = 0,type = ColumnFormatEnum.DICT,dictCodeType = "GoodsType")
    private String goodsType; //产品类型

    @ListShowColumn(title = "包装方式",sort = 1,type = ColumnFormatEnum.DICT,dictCodeType = "GroupType")
    private String groupType; //包装方式

    @Column
    @ListShowColumn(title = "图片id",sort = 2,type = ColumnFormatEnum.IMAGE)
    private Long imgId ;   //图片id

    @Column(nullable = false)
    @ListShowColumn(title = "商品名称",sort = 3)
    private String name; //商品名称

    private Long venderId; //厂商id

    @ListShowColumn(title = "厂商名称",sort = 4)
    private String venderName; //厂商名称


    @ListShowColumn(title = "商品描述",sort = 5)
    private String goodsInfo; //商品描述

    @Transient
    //是否是特定人群的判定 数据库并不存储此字段
    private String tagFlag;

   
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getGoodsInfo() {
        return goodsInfo;
    }

    public void setGoodsInfo(String goodsInfo) {
        this.goodsInfo = goodsInfo;
    }

    public Long getVenderId() {
        return venderId;
    }

    public void setVenderId(Long venderId) {
        this.venderId = venderId;
    }

    public String getVenderName() {
        return venderName;
    }

    public void setVenderName(String venderName) {
        this.venderName = venderName;
    }

    public Long getImgId() {
        return imgId;
    }

    public void setImgId(Long imgId) {
        this.imgId = imgId;
    }

    public String getGoodsType() {
        return goodsType;
    }

    public void setGoodsType(String goodsType) {
        this.goodsType = goodsType;
    }

    public String getGroupType() {
        return groupType;
    }

    public void setGroupType(String groupType) {
        this.groupType = groupType;
    }

    public String getTagFlag() {
        return tagFlag;
    }

    public void setTagFlag(String tagFlag) {
        this.tagFlag = tagFlag;
    }
}
